package com.raymond.cmpp.client.handler;

import com.alibaba.fastjson.JSONObject;
import com.raymond.cmpp.client.CmppClient;
import com.raymond.cmpp.common.msg.response.SubmitResponseMessage;
import io.netty.channel.ChannelHandlerContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author :  raymond
 * @version :  V1.0
 * @date :  2021-08-06 10:43
 */
public class SubmitResponseMessageHandler extends BaseBusinessHandler<SubmitResponseMessage> {

    private final static Logger logger = LoggerFactory.getLogger(SubmitResponseMessageHandler.class);

    public SubmitResponseMessageHandler(CmppClient queueClient) {
        super(SubmitResponseMessage.class, queueClient);
    }

    @Override
    protected void channelRead(ChannelHandlerContext ctx, SubmitResponseMessage msg) throws Exception {
        logger.debug("短信发送响应:" + JSONObject.toJSONString(msg));
        responseNotice(msg);
    }
}
